package cn.lizemin.common;

import lombok.Data;

/**
 * @author lzm
 * @Date 2024/11/3
 * @description
 */
@Data
public class RespBean {
    private int code;
    private String msg;
    private Object data;

    private RespBean(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static RespBean success(Object data) {
        return new RespBean(200, "success", data);
    }

    public static RespBean fail() {
        return new RespBean(500, "系统异常", null);
    }

}
